<div class="row">
    <div class="col-sm-6 col-sm-offset-3 col-md-4 col-md-offset-4">
        <span class="text-center">
            <?php echo $this->flashMessenger()->render('error', array('alert', 'alert-danger')); ?>
        </span>
        <div class="panel panel-primary">
            <div class="panel-heading">
              <h3 class="panel-title">Register</h3>
            </div>
            <div class="panel-body">
                <?php
                    $form = $this->form;
                    $form->setAttribute('action', $this->url('authdoctrine/default', array('controller' => 'registration', 'action' => 'index')));
                    $form->prepare();
                ?>
                <?php echo $this->form()->openTag($form); ?>

                <div class="form-group col-xs-12 <?php echo ($this->formElementErrors($form->get('usr_name'))) ? 'has-error' : '' ; ?>">
                    <?php echo $this->translate($this->formLabel($form->get('usr_name'))); ?>
                    <?php echo $this->formInput($form->get('usr_name')); ?>
                    <div class="col-sm-12">
                        <div class="help-block"><?php echo $this->translate($this->formElementErrors($form->get('usr_name'))); ?></div>
                    </div>
                </div>
                <div class="form-group col-xs-12 <?php echo ($this->formElementErrors($form->get('usr_email'))) ? 'has-error' : '' ; ?>">
                    <?php echo $this->translate($this->formLabel($form->get('usr_email'))); ?>
                    <?php echo $this->formInput($form->get('usr_email')); ?>
                    <div class="col-sm-12">
                        <div class="help-block"><?php echo $this->translate($this->formElementErrors($form->get('usr_email'))); ?></div>
                    </div>
                </div>
                <div class="form-group col-xs-12 <?php echo ($this->formElementErrors($form->get('usr_password'))) ? 'has-error' : '' ; ?>">
                    <?php echo $this->translate($this->formLabel($form->get('usr_password'))); ?>
                    <?php echo $this->formInput($form->get('usr_password')); ?>
                    <div class="col-sm-12">
                        <div class="help-block"><?php echo $this->translate($this->formElementErrors($form->get('usr_password'))); ?></div>
                    </div>
                </div>
                <div class="form-group col-xs-12 <?php echo ($this->formElementErrors($form->get('usr_password_confirm'))) ? 'has-error' : '' ; ?>">
                    <?php echo $this->translate($this->formLabel($form->get('usr_password_confirm'))); ?>
                    <?php echo $this->formInput($form->get('usr_password_confirm')); ?>
                    <div class="col-sm-12">
                        <div class="help-block"><?php echo $this->translate($this->formElementErrors($form->get('usr_password_confirm'))); ?></div>
                    </div>
                </div>
                <div class="form-group col-xs-12 <?php echo ($this->formElementErrors($form->get('captcha'))) ? 'has-error' : '' ; ?>">
                    <div class="col-xs-12">
                        <?php echo $this->formRow($form->get('captcha')); ?>
                        <?php echo $this->translate($this->formLabel($form->get('captcha'))); ?>
                    </div>
                    <div class="col-sm-12">
                        <div class="help-block"><?php echo $this->translate($this->formElementErrors($form->get('captcha'))); ?></div>
                    </div>
                </div>
                <div class="col-xs-12">
                    <?php echo $this->formButton()->openTag($form->get('submit')); ?>
                        <i class="fa fa-check"></i> <?php echo $this->translate($form->get('submit')->getValue()); ?>
                    <?php echo $this->formButton()->closeTag(); ?>
                </div>

                <?php echo $this->form()->closeTag(); ?>
            </div>
        </div>
    </div>
</div>
